  <template>
  <div style="align=center">
    <!-- <p>机构详情</p> -->

    <div style="display: inline; margin-left: 3%">
      <h4 style="display: inline">机构名称:</h4>
      <input
        type="text"
        :disabled="true"
        style="display: inline; margin-left: 7%; height: 30px"
        v-model="oname"
      />
    </div>
    <div style="margin-top: 3%; margin-left: 3%">
      <h4 style="display: inline">联系电话:</h4>
      <input
        type="text"
        :disabled="true"
        style="display: inline; margin-left: 7%; height: 30px"
        v-model="tel"
      />
    </div>
    <div style="margin-top: 3%; margin-left: 3%">
      <h4 style="display: inline">地址:</h4>
      <input
        type="text"
        :disabled="true"
        style="display: inline; margin-left: 10%; height: 30px"
        v-model="address"
      />
    </div>
    <div style="margin-top: 3%; margin-left: 3%">
      <h4 style="display: inline">业务范围:</h4>
      <input
        type="text"
        :disabled="true"
        style="display: inline; margin-left: 7%; height: 30px"
        v-model="scope_of_service"
      />
    </div>
    <div style="margin-top: 3%; margin-left: 3%">
      <h4 style="display: inline">工作时间:</h4>
      <input
        type="text"
        :disabled="true"
        style="display: inline; margin-left: 7%; height: 30px"
        v-model="work_time"
      />
    </div>
  </div>
</template>
<script>
import axios from "axios";
export default {
  data() {
    return {
      oname: "",
      tel: "",
      address: "",
      scope_of_service: "",
      work_time: "",
    };
  },
  methods: {
    //免疫登记
    init() {
      // alert(sessionStorage.getItem("rid"));

      //   console.log(this.itype);
      console.log(this.$store.state.userid);
      this.$axios
        .get(
          "http://localhost:9091/immune/organization/getOrganizationByuid",

          {
            params: {
              uid: this.$store.state.userid,
            },
          }
        )
        .then((resp) => {
          // console.log(resp);

          if (resp.data.code == 200) {
            (this.oname = resp.data.data.oname),
              (this.tel = resp.data.data.tel),
              (this.address = resp.data.data.address),
              (this.scope_of_service = resp.data.data.scope_of_service),
              (this.work_time = resp.data.data.work_time),
              this.$message({
                type: "success",
                message: resp.data.message,
              });
          } else {
            this.$message({
              type: "info",
              message: resp.data.message,
            });
          }
        });
    },
  },
  mounted() {
    this.init();
  },
  computed: {},
};
</script>
<style scoped>
.height {
  height: 100px;
  width: 200px;
}
</style>
